package org.uoss.core.logging.impl;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.uoss.core.logging.ILogger;

public class LoggerImpl implements ILogger{
	private static final Log logger = LogFactory.getLog("");

	@Override
	public void info(Class<?> clzClass, String methodName, String message) {
		this.info(clzClass, methodName, message, null);
	}

	@Override
	public void info(Class<?> clzClass, String methodName, String message, Throwable e) {
		if(logger.isInfoEnabled()){
			logger.info(clzClass.getName() + "," + methodName + "," + message,e);
		}
	}

	@Override
	public void warn(Class<?> clzClass, String methodName, String message) {
		if(logger.isWarnEnabled()){
			logger.warn(clzClass.getName() + "," + methodName + "," + message);
		}
	}

	@Override
	public void error(Class<?> clzClass, String methodName, String message, Throwable e) {
		if(logger.isErrorEnabled()){
			logger.error(clzClass.getName() + "," + methodName + "," + message,e);
		}
	}

}
